import instance from '@/request/request'

/**
 * 分页查询项目信息
 * @param param 查询条件
 * @returns {*}
 * @constructor
 */
export  const  GetProjectPageApi=(param)=>{
  return instance({
    url:`/api/project/pageProject`,
    method:'get',
    params:param
  })
}

export  const  GetProjectExtractPageApi=(param)=>{
  return instance({
    url:`/api/project/pageExtractProject`,
    method:'get',
    params:param
  })
}
/**
 * 添加项目信息
 * @param data
 * @returns {Promise<AxiosResponse<any>> | *}
 * @constructor
 */
export const AddProjectApi=(data)=>{
  return instance({
    url:`/api/project/addProject`,
    method:'post',
    data
  })
}
/**
 * 根据id获取项目信息
 * @param id
 * @returns {Promise<AxiosResponse<any>> | *}
 * @constructor
 */
export const  GetProjectById=(id)=>{
  return instance({
    url:`/api/project/getById/${id}`,
    method:'get'
  })
}
/**
 * 根据id获取项目信息
 * @param id
 * @returns {Promise<AxiosResponse<any>> | *}
 * @constructor
 */
export const  GetProjectInfoById=(id)=>{
  return instance({
    url:`/api/project/getInfoById/${id}`,
    method:'get'
  })
}
/**
 * 修改项目信息
 * @param data
 * @returns {Promise<AxiosResponse<any>> | *}
 * @constructor
 */
export const UpdateProjectApi=(data)=>{
  return instance({
    url:`/api/project/updateProject`,
    method:'put',
    data
  })
}
/**
 * 修改项目状态
 * @param id
 * @returns {Promise<AxiosResponse<any>> | *}
 * @constructor
 */
export const CancelProjectApi=(id)=>{
  return instance({
    url:`/api/project/cancelProject/${id}`,
    method:'put'
  })
}

/**
 * 根据id获取未抽取项目信息
 * @param id
 * @returns {Promise<AxiosResponse<any>> | *}
 * @constructor
 */
export const  GetReviewProjectApi=(id)=>{
  return instance({
    url:`/api/project/getProjectInfo/${id}`,
    method:'get'
  })
}
/**
 * 获取未抽取专家的项目信息
 * @returns {*}
 */
export const  getProjectOptions=()=>{
  return instance({
    url:`/api/project/getProjectOptions`,
    method:'get'
  })
}
/**
 * 获取未抽取专家的项目信息
 * @returns {*}
 */
export const  getExtractionConditions=()=>{
  return instance({
    url:`/api/project/getExtractionConditions`,
    method:'get'
  })
}
